const router = require('koa-router')() // koa2路由实现需要依赖koa-router插件

router.prefix('/users') // 设置前缀

router.get('/', function (ctx, next) {
  ctx.body = 'this is a users response!'
})

router.get('/bar', function (ctx, next) {
  ctx.body = 'this is a users/bar response'
})

module.exports = router
